/**
	

	@author Matthew Richmond
	@version 2006-08-31
*/
class Cascade
{
		

// ===========================================================
// - CONSTRUCTOR
// ===========================================================
	public function Cascade() {}

	/**
		Returns an array of objects with x and y coords.
		example:
		<code>
		var myArray = Cascade.getPoints(200, 200, 50, 5, 20);
		trace(myarray[0].x);
		</code>
	*/	
	static function getPoints(x:Number, y:Number, spanX:Number, spanY:Number, numpoints:Number):Array {
		var arrPoints:Array = new Array();
		for (var i=0; i<numpoints; i++) {
			//var angle = (360/numpoints) * i - offset; // first point 
			//var rad = angle * (Math.PI/180);
			var px = (x - (spanX * .5)) +  (spanX/numpoints * i);
			var py = (y - (spanY * .5)) +  (spanY/numpoints * i);
			arrPoints.push({
			x: px,
			y: py
			});
		}
		return arrPoints;
	}
}